import Vue from 'vue';
import VueRouter from 'vue-router';

import Home from '@/components/Home.vue';
import About from '@/components/About.vue';
import Movie from '@/components/Movie.vue';
import Tab1 from '@/components/tabs/Tab1.vue';
import Tab2 from '@/components/tabs/Tab2.vue';


Vue.use(VueRouter);

const router = new VueRouter({
    routes: [{
            path: '/',
            redirect: 'home'
        }, {
            path: '/home',
            component: Home
        }, {
            path: '/about',
            component: About,
            redirect: '/about/tab1',
            children: [{
                path: 'tab1',
                component: Tab1,
            }, {
                path: 'tab2',
                component: Tab2
            }, ]
        }, {
            path: '/movie/:id',
            component: Movie,
        },

    ]
});

export default router;